import http from '@/utils/http'
import imagehttp from '@/utils/uploadImageHttp'


/** @desc 获取用户列表 */
export function getCustomerList(data) {
  return http.get('admin_v1/customer_list', data)
}

/** @desc 获取用户消费详情 */
export function getCustomerDetail(data) {
  return http.get('admin_v1/records', data)
}

/** @desc 上传图片 */
export function uploadImage(data) {
  return imagehttp.post('xzl_index.php', data)
}

/** @desc 修改用户信息 */
export function updateCustomer(data) {
  return http.post('admin_v1/customer_update?type=edit', data)
}

/** @desc 修改用户余额 */
export function uploadBalance(data, type) {
  return http.post('admin_v1/customer_balance?type=' + type, data)
}

/** @desc 用户启用 */
export function uploadUserStart(data) {
  return http.post('admin_v1/customer_update?type=start', data)
}
/** @desc 用户禁用 */
export function uploadUserStop(data) {
  return http.post('admin_v1/customer_update?type=stop', data)
}